package com.chouxiaozi.controller;

import com.chouxiaozi.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping
@ResponseBody
@Controller
public class HelloController {

    @Autowired(required = false)
    HelloService helloService;

    @GetMapping(value = "/hello",produces = "text/html;charset=utf-8;")
    public String SayHello(){
        return helloService.sayHello();
    }
}
